Repository navigation
fix(android): bound helper stderr in client errors and the request log - #4888
Conversation
…the request log Helper stderr reached the client error, the failure reason, and the android_snapshot_helper_failed request-log entry unfiltered. A tagless hierarchy fragment that lands on stderr therefore travels to remote clients and the downloadable request log. Failures now publish stderr through a bounded, snapshot-content-free diagnostic: lines holding attribute-like assignments, markup, entities or payload records are withheld whole, the kept text stays inside the field cap, and stderrWithheldLines records the omission. The cause line a provider reads stays visible. Refs #4026.
Size Report
Startup median (7 runs, lower is better):
|
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
This PR is ready at 4ccdb14: helper stderr is filtered and bounded before it reaches client errors and the request log, and the required fix sections are present. CI is green; the two cancelled Body rules runs were stopped by concurrency, and later runs of the same workflow passed at this head. There are no conflicts, and no further action is needed before merge. Not blocking, and fine to take or leave: (1) the filter in instrumentation-helper.ts is a deny-pattern, so plain prose that quotes a node label without quotes or markup, such as |
Summary
A failing Android snapshot helper published its raw stderr to the client error, the failure-reason cause line, and the
android_snapshot_helper_failedrequest-log entry. Remote clients download that log, so a tagless hierarchy fragment landing on stderr could carry screen text. Helper failures now publish stderr through one bounded, snapshot-content-free diagnostic: lines holding an attribute-like assignment, markup, an entity, or a payload record are withheld whole, kept text stays inside the 2,048-character cap, andstderrWithheldLinesrecords the omission. The cause line a provider reads stays visible. Four files, no scope expansion. Fixes #4026.Before / after
One failing run, stderr:
c37bb956: the client error ends…parseable output: ret" text="<value>" />,details.stderrholds the raw stream, and the request-log reason holds the fragment.4ccdb14c: the error ends…parseable output: uiautomator unavailable,details.stderris the two kept cause lines,details.stderrWithheldLinesis1, and no surface holds the fragment.stderrandstderrWithheldLines: 1.Validation
Base
c37bb956, head4ccdb14c25.vitest run --project unit-core packages/platform-android/src/__tests__/snapshot-helper-exit-result.test.ts: 4 failed at base (raw stderr in details, message and request log), 34 passed at head.vitest run --project unit-core packages/platform-android: 1450 passed.pnpm format,tsc --noEmit,oxlint: clean. CI owns the full gate: green at head (19 success, 0 failing), including coverage, integration, repo guards and the device smoke lanes.🤖 Generated with Claude Code